import { ConfigVO, ConfigDTO, Config } from './model/configModel';
import { defHttp } from '/@/utils/http/axios';

enum Api {
  List = '/sys/config/list',
  Save = '/sys/config/save',
  Del = '/sys/config',
}

// 分页查询
export const configList = (params: ConfigVO) => defHttp.post<ConfigDTO>({ url: Api.List, params });

// 保存
export const configSave = (params: Config) => defHttp.post<Config>({ url: Api.Save, params });

// 删除
export const configDel = (params: { ids: String }) =>
  defHttp.delete<boolean>({ url: Api.Del + `/${params.ids}` });
